//package com.example.teacher.config;
//
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
//import java.util.concurrent.ExecutorService;
//import java.util.concurrent.LinkedBlockingQueue;
//import java.util.concurrent.ThreadPoolExecutor;
//import java.util.concurrent.TimeUnit;
//
//@Configuration
//public class ThreadPoolConfig {
//
//    @Bean("refreshExecutor")
//    public ExecutorService refreshExecutor() {
//        return new ThreadPoolExecutor(
//                10,                // 核心线程数
//                50,                // 最大线程数
//                60,                // 空闲线程存活时间
//                TimeUnit.SECONDS,
//                new LinkedBlockingQueue<>(1000),  // 任务队列
//                new ThreadPoolExecutor.CallerRunsPolicy()  // 拒绝策略
//        );
//    }
//}
